import axios from "axios";



//获取歌曲url
export const playSong = (params) => axios({
    url: "/api/song/url",
    method: "get",
    params
})

//获取歌曲详情
// export const songDetails = (ids) => axios({
//     url: "/api/song/detail",
//     method: "get",
//     params: {
//         ids
//     }
// })

//获取动态详情
export const dynamic = () => axios({
    url: "/api/event?pagesize=1&lasttime=155",
    method: "get"
})

//获取所有排行榜
export const ranking = () => axios({
    url: "/api/toplist",
    method: "get"
})

// 获取歌单详情
export const rankingSong = (params) => axios({
    url: "/api/playlist/detail",
    method: "get",
    params
})

//获取电台分类
export const broadcastingClassify = () => axios({
    url: "/api/dj/catelist",
    method: "get"
})

//获取电台分类推荐
export const classifyRecommend = (type) => axios({
    url: "/api/dj/recommend/type",
    method: "get",
    params: {
        type
    }
})

//获取电台节目
export const radioDetails = (rid) => axios({
    url: "/api/dj/program",
    method: "get",
    params: {
        rid
    }
})

//获取歌手简介
export const singerDetails = (id) => axios({
    url: "/api/artist/desc",
    method: "get",
    params: {
        id
    }
})

//搜索
export const searchSong = (keywords) => axios({
    url: "/api/search",
    method: "get",
    params: {
        keywords
    }
})

//mv id
export const leftId = () => axios({
    url: '/api/mv/first?limit=1',
    method: 'get'
})

//mv url
export const leftUrl = (data) => axios({
    url: '/api/mv/url',
    method: 'post',
    data
})


//精品歌单
export const right = () => axios({
    url: '/api/top/playlist/highquality?before=1503639064232',
    method: 'get'
})

//网友精选碟
export const song = () => axios({
    url: '/api/top/playlist?limit=6&order=new',
    method: 'get',
})


//热门歌手
export const single = () => axios({
    url: '/api/artist/desc?id=6452',
    method: 'get'
})

//电台
export const bottom = () => axios({
    url: '/api/program/recommend?limit=4',
    method: 'get'
})


//精品歌单详情
export const jump = (params) => axios({
    url: '/api/playlist/detail',
    method: 'get',
    params
})

//歌单评论
export const chat = (data) => axios({
    url: '/api/comment/playlist ',
    method: 'post',
    data
})


//发送评论
export const csend = (params) => axios({
    url: '/api/comment',
    method: 'get',
    params
})


//收藏者
export const store = (params) => axios({
    url: '/api/playlist/subscribers?limit=60',
    method: 'get',
    params
})

//播放音乐
export const music = (params) => axios({
    url: '/api/song/url',
    method: 'get',
    params
})


//获取歌曲详情===播放页
export const songDetails = (params) => axios({
    url: "/api/song/detail",
    method: "get",
    params
})

//歌词
// export const singLanguage = () => axios({
//     url: "/api/lyric?id=33894312",
//     method: "get",

// })
// })
//热门歌手 
export const getHotSingers = () => axios({
    url: "/api/top/artists",
    method: "get"
})

// 歌手分类列表
export const getArtistList = (params) => axios({
    url: "/api/artist/list",
    method: "get",
    params
})

//获取歌手单曲
export const getSingerSingle = (data) => axios.get("/api/artists/album", { params: data })

// 获取歌手MV
export const getSingerMv = (data) => axios.get("/api/artist/mv", { params: data })

// 登录
export const login = (data) => axios({
    url: "/api/login/cellphone",
    method: "post",
    data
})

// 获取相似歌手
export const getSimiSinger = (params) => axios({
    url: "/api/simi/artist",
    method: "get",
    params
})

// 获取用户歌单
export const getUserSonglist = (data) => axios({
    url: "/api/user/playlist",
    method: "post",
    data
})

// 获取歌单详情
export const getSonglistDetail = (params) => axios({
    url: "/api/playlist/detail",
    method: "get",
    params
})

// 获取歌曲详情
export const getSongsDetail = (params) => axios({
        url: "/api/song/detail",
        method: "get",
        params
    })
    //收藏者信息
export const userSonglist = (params) => axios({
    url: "/api/user/detail",
    method: "get",
    params
})

//收藏者歌单
export const playlist = (params) => axios({
    url: "/api/user/playlist",
    method: "get",
    params
})